Graphics.DrawString Method

Draws the text at the specified location. The Y parameter specifies the baseline for the text.

Syntax

Graphics.DrawString Text, X, Y, [WrapWidth], [Condense]


Parameters

Text

String

X

Integer

Y

Integer

WrapWidth (Optional)

Integer

Condense (Optional)

Boolean


The optional WrapWidth parameter specifies the width (in pixels) at which text should wrap. If the optional Condense property is True, DrawString tries to kern the string to fit into the space specified by WrapWidth. If it can't fit it in, it will use an ellipsis ("...") to indicate that there is additional text that is not shown.